import 'package:flutter/material.dart';
import 'package:niu_app/configs/app_style_config.dart';
import 'package:niu_app/pages/model/homepage/niu_account_model.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:niu_app/views/jk/jk_text.dart';
class NiuaccountWidget extends StatelessWidget {
  final niuAccountModel dataModel;

  const NiuaccountWidget({Key key, this.dataModel}) : super(key: key);


  @override
  Widget build(BuildContext context) {
    return Container(
      color: AppStyleConfig.TextColor,
      child: Column(
        children: [
          bottom(),
          
        ],
      ),
    );
  }

  Widget bottom(){
    return Container(
      height: 170.w,
      width: 375.w,
      padding: EdgeInsets.all(16),
      decoration: BoxDecoration(
        border: Border(
          bottom: BorderSide(
            color: AppStyleConfig.color2.withOpacity(0.6)
          )
        )
      ),
      child:Column(
        children: [
          Row(
            mainAxisAlignment: MainAxisAlignment.spaceBetween,
            children: [
              Row(
                children: [
                  Image.asset("${dataModel.url}",height: 32.w,width: 32.w,),
                  SizedBox(width: 8.w,),
                  JKText(
                    data: "${dataModel.title}",
                    fontSize: 14.w,
                    weight: FontWeight.bold,
                  )
                ],
              ),
              Row(
                children: [
                  Container(
                    height: 18.w,
                    width: 86.w,
                    color: AppStyleConfig.color6,
                    child: Center(
                      child: JKText(
                        data: "${dataModel.title1}",
                        color: AppStyleConfig.background,
                        fontSize: 10.w,
                      ),
                    ),
                  ),
                  SizedBox(width: 8.w,),
                  Container(
                    height: 18.w,
                    width: 86.w,
                    color: AppStyleConfig.color6,
                    child: Center(
                      child: JKText(
                        data: "${dataModel.title2}",
                        color: AppStyleConfig.background,
                        fontSize: 10.w,
                      ),
                    ),
                  ),
                ],
              )
            ],
          ),
          SizedBox(height: 9.w,),
          Row(
            mainAxisAlignment: MainAxisAlignment.spaceAround,
            children: [
              Column(
                children: [
                  JKText(
                    data: "${dataModel.number1}",
                    fontSize: 16.w,
                    weight: FontWeight.bold,
                  ),
                  JKText(
                    data: "启动",
                    fontSize: 12.w,
                    color: AppStyleConfig.color7,
                  )
                ],
              ),
              Column(
                children: [
                  JKText(
                    data: "${dataModel.number2}",
                    fontSize: 16.w,
                    weight: FontWeight.bold,
                  ),
                  JKText(
                    data: "昨日",
                    fontSize: 12.w,
                    color: AppStyleConfig.color7,
                  )
                ],
              ),
              Column(
                children: [
                  JKText(
                    data: "${dataModel.number3}",
                    fontSize: 16.w,
                    weight: FontWeight.bold,
                  ),
                  JKText(
                    data: "今日",
                    fontSize: 12.w,
                    color: AppStyleConfig.color7,
                  )
                ],
              )
            ],
          ),
          SizedBox(height: 10.w,),
          Row(
            mainAxisAlignment: MainAxisAlignment.spaceBetween,
            children: [
              Row(
                children: [
                  JKText(
                    data: "多仓数量：",
                    fontSize: 12.w,
                    color: AppStyleConfig.color7,
                  ),
                  JKText(
                    data: "${dataModel.number4}",
                    fontSize:12.w,
                    color: AppStyleConfig.color3,
                  )
                ],
              ),
              Row(
                children: [
                  JKText(
                    data: "持仓均价：",
                    fontSize: 12.w,
                    color: AppStyleConfig.color7,
                  ),
                  JKText(
                    data: "${dataModel.number5}",
                    fontSize:12.w,
                    color: AppStyleConfig.color3,
                  )
                ],
              ),
            ],
          ),
          Row(
            mainAxisAlignment: MainAxisAlignment.spaceBetween,
            children: [
              Row(
                children: [
                  JKText(
                    data: "空仓数量：",
                    fontSize: 12.w,
                    color: AppStyleConfig.color7,
                  ),
                  JKText(
                    data: "${dataModel.number6}",
                    fontSize:12.w,
                    color: AppStyleConfig.color8,
                  )
                ],
              ),
              Row(
                children: [
                  JKText(
                    data: "持仓均价：",
                    fontSize: 12.w,
                    color: AppStyleConfig.color7,
                  ),
                  JKText(
                    data: "${dataModel.number7}",
                    fontSize:12.w,
                    color: AppStyleConfig.color8,
                  )
                ],
              ),
            ],
          ),
        ],
      ),
    );
  }

}
